<!-- catalog/templates/catalog/all_borrowed.html -->
{% extends "base_generic.html" %}

{% block content %}
  <h1>所有借出书籍</h1>

  <table class="table">
    <tr>
      <th>书籍标题</th>
      <th>借用人</th>
      <th>应归还日期</th>
    </tr>
    {% for bookinst in bookinstance_list %}
      <tr>
        <td><a href="{% url 'book-detail' bookinst.book.pk %}">{{ bookinst.book.title }}</a></td>
        <td>{{ bookinst.borrower.username }}</td>  <!-- 借用人用户名 -->
        <td>{{ bookinst.due_back|date:"Y-m-d" }}</td>
      </tr>
    {% endfor %}
  </table>
{% endblock %}